import request from '@/utils/request'

// 后台：当前用户权限下的培训列表页，条件可选
export function trainList(data) {
  return request({
    url: '/applet-api/course/pageCourse',
    method: 'post',
    data,
  })
}

// 后台：查询指定课程
export function detailsCourse(data) {
    return request({
      url: '/applet-api/course/detailsCourse',
      method: 'post',
      data,
    })
}

// 后台：发起人完善培训记录
export function perfectCourseRecordDetails(data) {
    return request({
      url: '/applet-api/course/perfectCourseRecordDetails',
      method: 'post',
      data,
    })
}

// 后台：发起微小课
export function addDetail(data) {
    return request({
      url: '/applet-api/course/initiateCourse',
      method: 'post',
      data,
    })
}
// 后台：待办微小课评分
export function courseScore(data) {
    return request({
      url: '/applet-api/course/courseScore',
      method: 'post',
      data,
    })
}
// 后台：删除微小课
export function deleteCourseById(data) {
    return request({
      url: '/applet-api/course/deleteCourseById',
      method: 'post',
      data,
    })
}

// 后台：培训待确认列表
export function toBeConfirmedList(data) {
    return request({
      url: '/applet-api/course/toBeConfirmedList',
      method: 'post',
      data,
    })
}

// 后台：用户确认是否参加培训
export function receiveCourse(data) {
    return request({
      url: '/applet-api/course/receiveCourse',
      method: 'post',
      data,
    })
}

// 后台：编辑培训记录
export function updateCourseRecordDetails(data) {
    return request({
      url: '/applet-api/course/updateCourseRecordDetails',
      method: 'post',
      data,
    })
}

// 后台：车间审核人审核微小课
export function workshopCheckCourse(data) {
    return request({
      url: '/applet-api/course/workshopCheckCourse',
      method: 'post',
      data,
    })
}

// 后台：班组审核人审核微小课
export function teamCheckCourse(data) {
    return request({
      url: '/applet-api/course/teamCheckCourse',
      method: 'post',
      data,
    })
}

// 后台：添加不参加微小课原因
export function toBeConfirmedNonArrival(data) {
    return request({
      url: '/applet-api/course/toBeConfirmedNonArrival',
      method: 'post',
      data,
    })
}

// 后台：培训待确认详细信息
export function toBeConfirmedCourseDetails(data) {
    return request({
      url: '/applet-api/course/toBeConfirmedCourseDetails',
      method: 'post',
      data,
    })
}
